<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //Person.prototype == Object.prtotype.constructor == Object


        Person.prototype.name = '蜗牛'
        function Person(){
          //var this{
            //__proto__ = Person.prototypa
          //}
            // return this
        }
        var person = new Person()
        //console.log(person.__proto__);//{} 是由Person()创建的

        var obj = {
            name: 'woniu'
        }
        // console.log(person.__proto__);  蜗牛
        person.__proto__ = obj
        console.log(person.__proto__);
    </script>
    <script>
        //注意
        Person.prototype.name='家俊'
        function Person(){

        }
        Person.prototype={
            name:'赖总'
        }
        var person =new Person()
        console.log(person.name)

    </script>
</body>
</html>